<template>
    <el-form ref="form" :model="form" label-width="80px">
          <el-form-item prop="name">
            <div slot="label" style="margin-left:10px;">作者姓名</div>
            <el-input v-model="name" v-on="fatherc(name)" placeholder="请输入名称"></el-input>
          </el-form-item>
            <el-form-item prop="email">
          <div slot="label" style="margin-left:10px;">作者邮箱</div>
          <el-input v-model="form.region" placeholder="请输入对应信息" @blur="email_blur"></el-input>
           <span style="color: red">
    		{{message}}
    	    </span>
          </el-form-item>
          
    </el-form>
  


</template>

<script>
  export default {
   
    data() {
      return {
        name:'',
        message:'',
       form: {
          
          region: '',
         
        }
      }
     

    },
     methods: {
            fatherc(name){
                this.$parent.changeauthorname(name)
            },
            email_blur() {
                var verify = /^\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/;
                if (!verify.test(this.form.region)) {
                    this.message = '邮箱格式错误, 请重新输入'
                } else {
                    this.message = ''

                }
            },
        }

  }
</script>